﻿//加关注
function Submit(content, CallBack, responseDataType) {
	$.ajax({ type: "POST", url: content, dataType: responseDataType, data: content, success: function(responseText) {
		CallBack(responseText);
	}, error: function() {
		//alert("程序处理出错,请重新操作！");
	}
	});
}
function AddFansCallBack(res) {
	switch (res.resCode) {
		case "00":
			alert("请先登录吧");
			break;
		case "01":
			alert("添加关注成功。");
			break;
		case "02":
			alert("该用户您已添加过关注");
			break;
		case "03":
			alert("您不能对自己添加关注");
			break;
		case "04":
			alert("该用户不存在");
			break;
	}
}

function AddFans(ids) {
	var content = "source/ajax.php?ac=fans&id=" + ids;
	Submit(content, AddFansCallBack, "json");
}